import request from '@/utils/request'

// 查询采购列表
export function listBudget(query) {
  return request({
    url: '/budget/budget/list',
    method: 'get',
    params: query
  })
}

// 查询采购详细
export function getBudget(bgId) {
  return request({
    url: '/budget/budget/' + bgId,
    method: 'get'
  })
}

// 新增采购
export function addBudget(data) {
  return request({
    url: '/budget/budget',
    method: 'post',
    data: data
  })
}

// 修改采购
export function updateBudget(data) {
  return request({
    url: '/budget/budget',
    method: 'put',
    data: data
  })
}

// 删除采购
export function delBudget(bgId) {
  return request({
    url: '/budget/budget/' + bgId,
    method: 'delete'
  })
}


//批量新增
export function budList(data) {
  return request({
    url: '/budget/budget/budList',
    method: 'post',
    data: data
  })
}


export function updateOrInsertBudGet(data) {
  return request({
    url: '/budget/budget/updateOrInsertBudGet',
    method: 'post',
    data: data
  })
}

//批量删除
export function deleteBudGet(data) {
  return request({
    url: '/budget/budget/deleteBudGet',
    method: 'post',
    data: data
  })
}


